package com.caogen.cg_wl_kt.vmodel.fragment

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.caogen.cg_wl_kt.base.BaseViewModel
import com.caogen.cg_wl_kt.model.dashboard.DashboardBean
import com.caogen.cg_wl_kt.model.home.HomeListBean
import com.caogen.cg_wl_kt.utils.YDLog

class DashboardViewModel : BaseViewModel() {

    val data: MutableLiveData<MutableList<DashboardBean>>? =  MutableLiveData()
    val list: MutableList<DashboardBean> = mutableListOf()
    fun getListData(){
        list.clear()
        for (i in 0..8){
            var bean = DashboardBean();
            bean.id = "$i"
            bean.title = "$i"
            bean.sub = "$i---e"
            list.add(bean)
        }
        data?.value = list
        YDLog.logd(list.toString())
    }
}